<template>
  <div>
    <SearchBox v-if="handleIfShow" :inputVal="inputVal"/>
    <router-view />
    <van-tabbar v-model="active" active-color="#ee0a24" inactive-color="#000">
      <van-tabbar-item icon="home-o" to="/home/homepage">首页</van-tabbar-item>
      <van-tabbar-item icon="label-o">社区</van-tabbar-item>
      <van-tabbar-item icon="fire-o" to="/home/match">赛事</van-tabbar-item>
      <van-tabbar-item icon="user-o" to="/home/user">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
import SearchBox from '@/components/searchBox/SearchBox.vue'
export default {
  data() {
    return {
      inputVal: "",
      active: 0,
    };
  },
  components:{
    SearchBox
  },
  computed:{
    handleIfShow(){
      if(this.$route.name =='用户界面'){
        return false
      }
      return true
    }
  }
};
</script>

<style lang="less" scoped>
</style>